    import java.io.*;  
import java.util.ArrayList;
import java.util.Arrays;

    public class Dir  
    {  
        public void rodar(String cam) throws IOException{  
        	File arq = new File("arquivo.txt");  
        	FileWriter writer = new FileWriter("Arquivo.txt",true); 
        	File dir = new File(cam);
        	int i;
        	for (i=0;i<dir.list().length;i++)
        		 writer.write(cam + dir.list()[i] + "\n");
        	writer.close();
        }
    }  